home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 1.iso
/
ARGONET
/
PD
/
PROGRAMMING
/
DESKLIBC
/
SOURCES.ZIP
/
DeskLib
/
!DLSources
/
Libraries
/
Msgs
/
c
/
Drop
next >
Wrap
Text File
|
1995-07-23
|
2KB
|
64 lines
/*
#### # # # #
# # # # # The FreeWare C library for
# # ## ### # # # # ### RISC OS machines
# # # # # # # # # # # ___________________________________
# # #### ### ## # # # #
# # # # # # # # # # Please refer to the accompanying
#### ### #### # # ##### # ### documentation for conditions of use
________________________________________________________________________
File: Msgs.Drop.c
Author: Copyright © 1992 Jason Williams
Version: 1.00 (08 Apr 1992)
Purpose: MessageTrans-like message handling functions.
(If you want MessageTrans, use the SWI interface, if you want
high-level message handling, use this code...)
*/
#include <stdlib.h>
#include "MsgsDefs.h"
#include "DeskLib:Msgs.h"
extern void Msgs_DropGroup(char *grouptag)
{
msgdefptr ptr, next, last;
ptr = msgs_grouplist; /* Try to find group */
while (ptr != NULL)
{
if (Msgs__MatchToken(grouptag, ptr->tag, TRUE))
break;
last = ptr;
ptr = ptr->next;
}
if (ptr == NULL) /* group not found */
return;
if (ptr == msgs_grouplist) /* unlink from list */
msgs_grouplist = ptr->next;
else
last->next = ptr->next;
next = ptr->data.taglist; /* Kill group record */
free(ptr);
ptr = next;
while (ptr != NULL) /* Kill message list */
{
if (ptr->data.text != NULL)
free(ptr->data.text);
next = ptr->next;
free(ptr);
ptr = next;
}
/* cc warns 'last' may be used before being set */
}